<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/include/taglibs.jsp"%>
<%
pageContext.setAttribute("crlf", "\r\n");
pageContext.setAttribute("lf", "\n");
pageContext.setAttribute("cr", "\r");
%>

<script type="text/javascript">
$(document).ready(function(){

});

function showContent(no){
	
	if($("#tr_content_"+no).css("display")=="none"){
		$(".tr_content").hide();
		$("#tr_content_"+no).show();	
	}else{
		$(".tr_content").hide();
	}
	
}

function deleteData(dt1,dt2,dt3,dt4){
	var pw  = $("#bd_pwd").val();
	if(""==pw){
		alert("비밀번호를 입력해주세요");
		return false;
	}
	if(confirm("삭제하시겠습니까?")){
		location.href="./ubdmg0106T.do?bd_no="+dt1+"&p_id="+dt2+"&brd_no="+dt3+"&bd_pwd="+pw;	
	}
}

</script>
<style type="text/css">
<!--
/* body {background-color: #ff00ff;} */
-->
</style>
<c:if test="${!empty sessionScope['userInfo'].admin_id || param.p_id == sessionScope['userInfo'].p_id }">
<table cellspacing="0" cellpadding="0" border="0" width="100%"
	style="margin: 20px 0px 4px 0px;" >
	<tr valign="bottom">
		<td></td>
		<td align="right"><a
			href="./ubdmg0102Q.do?p_id=${param.p_id }&brd_no=${param.brd_no }"
			class="ebbaord-default"><img
				src='/usr/images/ic-write.gif' border='0' vspace='0'></a></td>
	</tr>
</table>
</c:if>



<table width="100%" border="0" cellspacing="0" cellpadding="0"
	align="center">
	<tr>
		<td valign="top" align="center">
 <BR>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td height="1" class="css_line" colspan="3"></td>
				</tr>
<c:if test="${list !=null && fn:length(list)>0 }">
	<c:forEach var="map" items="${list}" varStatus="status">
				<tr class="css_title">
					<td width="25" class="css_title">&nbsp;</td>
					<td style="cursor: pointer;text-align: left;"
						class="css_title left_5px">
						<a href="${map.bd_title }" target="_blank;">${map.bd_title } (${map.bd_name })</a>	
					</td>
					<td width="150" style="cursor: pointer;text-align: left;"
						class="css_title left_5px">
						<a href="#" onclick="$('#divPwdHide${map.bd_no }').show();$(this).hide();" class="ebbaord-default"><img src="/usr/images/ic-del.gif" border="0" vspace="0"></a>
<div id="divPwdHide${map.bd_no }" style="display: none;">
<input type="password" name="bd_pwd" id="bd_pwd" class="css_input" style="width: 80px;" value="<c:if test="${!empty sessionScope['userInfo'].admin_id || param.p_id == sessionScope['userInfo'].p_id }">${map.bd_pwd }</c:if>">
<a href="#" onclick="deleteData('${map.bd_no }','${map.p_id }','${map.brd_no }','');" class="ebbaord-default"><img src="/usr/images/ic-del.gif" border="0" vspace="0"></a>
</div>
					</td>
					
				</tr>
				<tr>
					<td height="1" class="css_line" colspan="3"></td>
				</tr>
	</c:forEach>
</c:if>
			</table> <!-- 메뉴출력 -->
			<table width="100%" border=0 cellspacing="2" cellpadding="4"
				STYLE="font: 9pt" align="center">
				<tr>
					<td valign="top" align="left">&nbsp;</td>
					<td valign="top" align="right">&nbsp;</td>
				</tr>
				<tr>
					<td colspan="2">
					${pageHtml }
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
